<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>管理后台首页</title>
    <link rel="stylesheet" href="{$CSS}/bootstrap3.3.7.min.css">
    <style>
        em{
            font-size: 20px;
            color: red;
            vertical-align: middle;
            line-height: 20px;
            height: 20px;
            display: inline-block;
        }
        .mar{
            margin-right:10px
        }
        .pic{
        	float:none;margin-bottom:10px
        }
        .pic img{
        	width: 393px;
    		height: 75px;
    	}
		 .pics{
        	float:none;margin-bottom:10px
        }
        .pics img{
        	width:80px;
    		height: 80px;
    	}
        .ontow{
            color: red;
            width: 100%
        }
    </style>
</head>
<body style="overflow-x:hidden;">
    <div style="padding:10px;border-bottom:1px solid #eee;font-size:15px;font-weight:700">站点设置</div>
    <div style="margin:40px auto;">
        <div class="bs-example" data-example-id="simple-horizontal-form">
            <form class="form-horizontal" method="post" action="" name="clientForm" id="clientForm" onsubmit="return checksub();">{tk()}{$u->hidden('id')}
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>网站名称</label>
                    <div class="col-sm-3">
						{$u->text('webname','class="form-control"  placeholder="网站名称"')}
                    </div>
                </div>
				 <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>网站标题</label>
                    <div class="col-sm-3">
						{$u->text('webtitle','class="form-control"  placeholder="网站标题"')}
                    </div>
                </div>

				  <div class="form-group">
                  <label class="col-sm-2 control-label"><em>*</em>网站Logo</label>
                     <div class="col-sm-8">
                       <img class="thumb_img" src="{$u->logo}" id="pic_logo"  relobj="elfinder_logo"style="width: 93px;height: 60px;" />
                       {$u->hidden('logo')}
                        <button class="btn btn-default select_img" type="button"  data-target="logo">选择图片</button>
                        <span class="help-inline">建议上传尺寸：93*60 pixels</span>
                      </div>
               </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>网站域名</label>
                    <div class="col-sm-3">
						{$u->text('domain','class="form-control" ')}
						(无需填写"http://")
                    </div>
                </div>
              <!--   {if $u->isadmin==1}
                    <div class="form-group">
                        <label for="inputPassword3" class="col-sm-2 control-label">炮灰域名</label>
                        <div class="col-sm-3">
                            {$u->text('paohui_link','class="form-control"  placeholder="炮灰域名"')}
                            (需填写"http://"或者"https://")
                        </div>
                    </div>
                {/if} -->
				 <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">网站关键词</label>
                    <div class="col-sm-4">
						{$u->text('key_word',' class="form-control" placeholder="网站关键词"')}
                    </div>
                </div>
				 <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">网站描述</label>
                    <div class="col-sm-4">
						{$u->text('describe',' class="form-control" placeholder="网站描述"')}
                    </div>
                </div>
				<div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">公司名称</label>
                    <div class="col-sm-4">
						{$u->text('company_name',' class="form-control" placeholder="公司名称"')}
                    </div>
                </div>
				<div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">公司地址</label>
                    <div class="col-sm-4">
						{$u->text('company_address',' class="form-control" placeholder="公司地址"')}
                    </div>
                </div>
				<div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">备案号</label>
                    <div class="col-sm-4">
						{$u->text('record_number',' class="form-control" placeholder="备案号"')}
                    </div>
                </div>

				 <div class="form-group">
                  <label class="col-sm-2 control-label"><em>*</em>二维码</label>
                     <div class="col-sm-8">
                       <img class="thumb_img" src="{$u->qr_code}" id="pic_pics" relobj="elfinder_pics" style=" width: 80px; height: 80px;" />
                       {$u->hidden('qr_code')}
                        <button class="btn btn-default select_img" type="button" data-target="pics">选择图片</button>
                        <span class="help-inline">建议上传尺寸：80x80 pixels</span>
                      </div>
               </div>
				 <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>联系电话</label>
                    <div class="col-sm-3">
						{$u->text('telephone',' class="form-control" ')}
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">客服QQ</label>
                    <div class="col-sm-3">
						{$u->text('kfcode',' class="form-control" ')}
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>新增用户默认级别</label>
                    <div class="col-sm-2">
						 {$u->select($yhlx_arr,'userlevel','class="form-control"')}
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>新增用户默认天数</label>
                    <div class="col-sm-1">
						 {$u->text('userdays','class="form-control"')}
						(单位"天")
                    </div>
                </div>
				{if $u->isadmin==1}
				{$uu->hidden('id')}
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>注册用户默认级别</label>
                    <div class="col-sm-2">
						{$uu->select($yhlx_arr,'registerlevel','class="form-control"')}
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>注册用户默认天数</label>
                    <div class="col-sm-1">
						 {$uu->text('registerdays','class="form-control" ')}
						(单位"天")
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>注册用户是否审核</label>
                    <div class="col-sm-2">
                        <label class="radio-inline">
						  {$uu->radio(array('0'=>"否"),'registerisstop','checked="checked"')}
                        </label>
                        <label class="radio-inline">
                          {$uu->radio(array('1'=>"是"),'registerisstop')}
                        </label>
                    </div>
                </div>
				{/if}
				 <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>注册是否需要验证码</label>
                    <div class="col-sm-2">
                        <label class="radio-inline">
						  {$u->radio(array('1'=>"是"),'register_check','checked="checked"')}
                        </label>
                        <label class="radio-inline">
                          {$u->radio(array('2'=>"否"),'register_check')}
                        </label>
                    </div>
                </div>
			 <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>是否开启pc模板</label>
                    <div class="col-sm-2">
                        <label class="radio-inline">
						  {$u->radio(array('1'=>"开启"),'switch_pc','checked="checked"')}
                        </label>
                        <label class="radio-inline">
                          {$u->radio(array('2'=>"关闭"),'switch_pc')}
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><em>*</em>企业微信扫码登录</label>
                    <div class="col-sm-2">
                        <label class="radio-inline">
                          {$u->radio(array('1'=>"开启"),'is_scan','checked="checked"')}
                        </label>
                        <label class="radio-inline">
                          {$u->radio(array('0'=>"关闭"),'is_scan')}
                        </label>
                    </div>
                    <div class="ontow">
                        注意：如第三方应用未配置完成，则本项开启也无效
                    </div>
                </div>
                <div class="form-group">
                   <label for="inputPassword3" class="col-sm-2 control-label"></label>
                    <div class="col-sm-6">
                        <input class="btn btn-success mar" ID="btnAdd" type="submit" value="提交">
                        <input class="btn btn-warning mar" ID="Submit1" type="reset" value="重置">
                        <input class="btn btn-danger mar"  ID="back" type="button" onclick="history.back();" value="返回">
                        </div>
                </div>
				
            </form>
        </div>

    </div>
</body>
<script src="/layui/layui.js"></script>
<script>
layui.use(['element', 'layer', 'upload'], function () {
  var layer = layui.layer;
});
$('.select_img').on('click',function  () {
  var targetId=this.getAttribute('data-target');
  layer.open({
    title:'图片库',
    type: 2,
    area: ['700px', '450px'],
    fixed: false, //不固定
    maxmin: false,
    content: '/imgLib/libs.html?type=vshop_img&target='+targetId
  });
})

window.uploadImgCallback=function (tgt,url) {
  console.log('选择图片结果',tgt,url);
  if(tgt=='logo'){
    var inputEle=$('#'+"{$u->elid('logo')}");
    var prevEle=$('#pic_logo');
    inputEle.val(url);
    prevEle.attr('src',url);
  }else if(tgt=='pics'){
	var inputEle=$('#'+"{$u->elid('qr_code')}");
    var prevEle=$('#pic_pics');
    inputEle.val(url);
    prevEle.attr('src',url);
  }
};
 function checksub(){
    var user_agencyuserdays = $("#user_agencyuserdays").val();
    var user_registerregisterdays = $("#user_registerregisterdays").val();
    if(user_agencyuserdays > 15){
        tusi("新增用户默认天数最多十五天");
        return false;
    }else if({$u->isadmin} == 1 && user_registerregisterdays> 15){
        tusi("注册用户默认天数最多十五天");
        return false;
    }
 }

</script>  
</html>